package com.bear.fastrepair.http.api

import com.bear.fastrepair.entity.*
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST
import retrofit2.http.PUT

interface EmployeeService {
    /**
     * 员工个人信息返回
     * @return EmployeePersonalInfoResponse
     */
    @POST("mobile/employee/info")
    suspend fun uploadPersonalInfo(): EmployeePersonalInfoResponse

    /**
     * 员工登录
     * @param employee EmployeeLogin
     * @return ResponseInfo
     */
    @POST("mobile/employee/login")
    suspend fun employeeLogin(@Body employee: EmployeeLogin): ResponseInfo

    /**
     * 重置密码
     * @param employeePasswordReset EmployeePasswordReset
     * @return ResponseInfo
     */
    @PUT("mobile/employee/resetPasswd")
    suspend fun employeeResetPassword(@Body employeePasswordReset: EmployeePasswordReset): ResponseInfo

    /**
     * 刷新员工位置信息
     * @param employeeAddressInfo EmployeeAddressInfo
     * @return ResponseInfo
     */
    @PUT("mobile/employee/updateLocation")
    suspend fun refreshEmployeeAddress(@Body employeeAddressInfo: EmployeeAddressInfo): ResponseInfo

    /**
     * 刷新员工位置信息
     * @param employeeAddressInfo EmployeeAddressInfo
     * @return ResponseInfo
     */
    @PUT("mobile/employee/updateLocation")
    fun refreshEmployeeAddressAuto(@Body employeeAddressInfo: EmployeeAddressInfo): Call<ResponseInfo>

    /**
     * 更新员工工作状态
     * @param status EmployeeWorkStatus
     * @return ResponseInfo
     */
    @PUT("/mobile/employee/updateWorkStatus")
    suspend fun updateWorkStatus(@Body status: EmployeeWorkStatus): ResponseInfo
}